import request from '@/utils/request'
/**
 * 获取列表
 * @returns
 */
export const getAllocationListApi = (params) => {
  return request({
    url: '/transfer/list',
    params
  })
}

/**
 * 获取部门列表
 * @returns
 */
export function getDptListApi() {
  return request({
    url: '/transfer/select/deptTree',
    method: 'post'
  })
}

/**
 * 获取部门中人员
 * @param {*} id
 * @returns
 */
export const getUserListApi = (deptId) => {
  return request({
    url: `/transfer/select/user/${deptId}`
  })
}

/**
 * 处理人员转派
 * @param {*} data
 * @returns
 */
export function editAllocationUserApi(data) {
  return request({
    url: '/transfer/update',
    method: 'put',
    data
  })
}
